<?php
include ('classes/page.class1.php');
include ('functions/le-format.php');
include ('functions/convert-characters.php');
$Motherboard_AMD = new Page;
$filename = "textfiles/Motherboard_AMD.txt";
$fd = fopen ($filename, "r");
$contents = fread ($fd,filesize ($filename));
fclose ($fd);
$splitcontents = explode("\n", $contents);
$counter = 0;
foreach ($splitcontents as $value)
{
$items[$counter] = explode("|", $value); $counter++;
}
$contents = "<table border=\"5\" width=\"480\" cellpadding=\"12\" cellspacing=\"15\"><tr>";
$sizeof_arr = sizeof($items);
$counter = 0;
for ($i=0; $i<$sizeof_arr; $i++)
{
$contents .= "<td align=center>";
$contents .=  $items[$i][1];
$contents .=  "<br /><b>" . $items[$i][2];
$contents .=  "</b>";
$contents .= "<form action='shoppingCart.php' method='get'><input type='hidden' name='id' value='" . $items[$i][0] . "'/><input type='submit' value='Buy' /></form><br /><a href='shoppingCart.php?id=" . $items[$i][0] . "'>Buy</a></td>";
if($counter >= 2)
{
$contents .= "</tr><tr>";
$counter = 0;
}
else
{
$counter++;
}}
$contents .= "</tr></table>";
$Motherboard_AMD->Title = "Motherboard (AMD)";
$Motherboard_AMD->MetaDescription = "";
$Motherboard_AMD->MetaKeywords = "";
$Motherboard_AMD->SetContent($contents);
$Motherboard_AMD->ThisPage = "Motherboard_AMD";
$Motherboard_AMD->Template();
?>